#pragma once
#include<iostream>
using namespace std;
template<class Iterator, class Ref, class Ptr>

class ReverseIterator
{
	typedef ReverseIterator< Iterator, Ref, Ptr> Self;

	ReverseIterator(Iterator it)
		:_it(it)
	{}

	Self operator++()
	{
		--_it;
		teturn* this;
	}

	Ref operator*()
	{
		return *_it;
	}

	Ptr operator->()
	{
		return _it.opertor->();
	}

	bool  operator!=(const Self& s)
	{
		return _it != s._it;
	}

private:
	Iterator _it;
};
